package com.syas.service.services;

import com.syas.base.service.services.EntityService;
import com.syas.dao.interfaces.ITargetDao;
import com.syas.model.models.Target;
import com.syas.service.interfaces.ITargetService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by weigong on 2015/12/5.
 */
@Service("TargetService")
public class TargetService extends EntityService<Integer, Target, ITargetDao> implements ITargetService {

    @Autowired
    public TargetService(@Qualifier("TargetDao") ITargetDao targetDao) {
        super(targetDao);
    }

    @Override
    public List<Target> getTargetList() {
        return entityDao.getTargetList();
    }


    @Override
    public List<Target> getTargetListByCitygrade(String citygrade) {
        if(citygrade != null) return entityDao.getTargetListByCitygrade(citygrade);
        return null;
    }



}
